473,421 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,421 software developers and data experts.

Browse button

11
Hi all

I have been having problems regarding styling input areas, submit buttons etc.
I followed some people's advice in other forums and I managed to get it going.

Now, everything is working EXCEPT 1 : The "browse-for-a-file" button

I thought that this button, since it is coded as <input type="file" ...> would be treated like the other input elements ,such as the buttons.
BUT THIS IS NOT HAPPENING!!!!!

Even if I change, for instance, font-size = 500px, the "Browse" button and the fonts inside the input area remain the same as without styling at all...

What am I missing here?
Sorry for asking so silly staff :(
Oct 7 '05 #1
6 16929
Niheel
2,460 Expert Mod 2GB
Hmm this worked for me, both in IE6.0 and Firefox. It might not work in older browsers. You can paste the code into a test.html file and open it in your browser.

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Untitled Document</title>
  6. <style type="text/css">
  7. <!--
  8. input {
  9.  font-family: Geneva, Arial, Helvetica, sans-serif;
  10.  font-size: 18px;
  11.  font-weight: bold;
  12.  background-color: #CCCCCC;
  13. }
  14. -->
  15. </style>
  16. </head>
  17. <body>
  18. <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
  19.   <input type="file" name="file" />
  20. </form>
  21. </body>
  22. </html>
  23.  
  24.  
Nov 18 '05 #2
mambai
1
hi everyone!
i also have a problem with browse button. when i post a file with firefox, it cut all the path and remain only the file name (and i want the full file path). The problem dont happen with IE.
So what can i do when i want to get a full file path with firefox?
Mar 5 '06 #3
hi everyone!
i also have a problem with browse button. when i post a file with firefox, it cut all the path and remain only the file name (and i want the full file path). The problem dont happen with IE.
So what can i do when i want to get a full file path with firefox?
A file field or "browse button" is to upload a file to a server, it is not ment to post a path only, you should use other methods (server variables) to get the path.
Mar 5 '06 #4
Banfa
9,065 Expert Mod 8TB
hi everyone!
i also have a problem with browse button. when i post a file with firefox, it cut all the path and remain only the file name (and i want the full file path). The problem dont happen with IE.
So what can i do when i want to get a full file path with firefox?
I am guessing that you are looking at the wrong part of the received data, however you have not said what environment (PHP, Perl or some other CGI) is receiving this file.

Certainly in the PHP environment what you receive is the original name of the file (minus path) and the full path to the temporary file that contains the uploaded file so that you can then copy it to the location that you require.

It is not clear why a server would need to know the location of a file on a users PC and in fact could consitute a security risk, all the server needs is the name of the file which I guess is why you are receiving the behaviour you you are.

Your file receiving code would be a handy thing to see to help you futher.
Mar 6 '06 #5
mrx
1
I am guessing that you are looking at the wrong part of the received data, however you have not said what environment (PHP, Perl or some other CGI) is receiving this file.

Certainly in the PHP environment what you receive is the original name of the file (minus path) and the full path to the temporary file that contains the uploaded file so that you can then copy it to the location that you require.

It is not clear why a server would need to know the location of a file on a users PC and in fact could consitute a security risk, all the server needs is the name of the file which I guess is why you are receiving the behaviour you you are.

Your file receiving code would be a handy thing to see to help you futher.
Hi
I have the same problem which I don´t think havent anything to do with the server. It´s when the user will pick a file from the local PC to be sent to a server, the path dissapears and the application that should take care of it wont find the file. That´s because FF only give the filename without the path. IE works fine.

henrik
Aug 28 '06 #6
Banfa
9,065 Expert Mod 8TB
You are going to have to be much more specific because on my FireFox the path is filled in fine. In fact if what you say is true then FireFox would not have the folowing it does as people rarely support broken software.

Give a detailed description of what happens, what actions you take as a user and where the problem occurs.
Aug 28 '06 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and...
1
by: Chris Lasher | last post by:
Hello, I'm trying to write a tool to scrape through some of the Ribosomal Database Project II's (http://rdp.cme.msu.edu/) pages, specifically, through the Hierarchy Browser....
5
by: Fred | last post by:
Hi I am searching for a module, that would allow me to call files by using a 'browse' button. Is there any uniform module for browsing files, or is there a special module for *.txt files? Thanks...
4
by: Werner Kaiser | last post by:
Hi, I want to change the text for the file-browse button within a form: I have something like that: <FORM ENCTYPE="multipart/form-data" ACTION="<?php echo basename(__FILE__)...
5
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and...
3
by: oopaevah | last post by:
I want to have a separate button which invokes the "browse" button on an input type=file. In internet explorer the following code works ok, in firefox nothing happens. All I do is call click()...
9
by: Prakash Singh Bhakuni | last post by:
am replacing the default "Browse..." button for input type=file. This works fine except that the form will only submit after the SUBMIT button is clicked twice. Any ideas on why this is happening...
0
by: sreenulanka | last post by:
when i am clicking the browse button image not opened in my applet please help me. // browse button, generate browse event when it clicks if (e.getSource()==browse) { ...
4
by: developing | last post by:
Hi All, I have a browse button that the user can click to select a file. The button then fetches the file path. This is all working fine except my boss wants some add functionality. I need it to...
1
by: ipa | last post by:
Hello, I made one browse button in asp form to store files. Now i am facing the problem is when i am editing that asp form. In that i call browse button during edit.but during edit, that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.